package de.koller.worlders.engine.tiles.light.lights;

import de.koller.worlders.WSea;
import java.util.HashSet;
import java.util.Set;

public class OLightContainer extends WSea {
	
	private final Set<IOverlayLight> olights = new HashSet<>();

	@Override
	protected void init() {
		super.init();
		
		//this.add( new OverlaySpot() );
	}
	
	public void add( IOverlayLight light ) {
		olights.add( light );
		light.generate( wroot );
	}
	
	public void remove( IOverlayLight light ) {
		olights.remove( light );
		light.ungenerate();
	}
	
	public void renderLightsNow() {
		for( IOverlayLight l : olights )
			l.renderThis();
	}
	
}
